﻿<%@ Page Language="C#" MasterPageFile="~/FrameMasterPage.master" AutoEventWireup="true" CodeFile="equipmentWarrantyAlert.aspx.cs" Inherits="equipmentWarrantyAlert" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="m_contentBody" Runat="Server">
<asp:Label ID="lblMessageValidate" runat="server" CssClass="permissionstyle"></asp:Label>
<asp:Panel ID="PanelShow" runat="server">
<table  class="GridItem" cellspacing="2" cellpadding="2" style="width:auto">
  <tr><td class="BigLabel"><asp:Label ID="lblTotalEquipment" runat="server"></asp:Label></td></tr>
  <tr>
  <td align="right" valign="top">
        &nbsp;Date end of warranty:
            <asp:TextBox ID="txtPurchaseDate" runat="server" Width="89px" 
            ontextchanged="txtPurchaseDate_TextChanged"></asp:TextBox>
            <asp:Image ID="imgCalendar" runat="server" ImageUrl="~/images/calendar.png" /> 
            <asp:Button  ID="btnSearch" runat="server" Height="25px" Text="Go" CssClass="btnexpress" 
        Width="52px" BorderStyle="Dotted" onclick="btnSearch_Click" />
            <cc2:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="txtPurchaseDate" PopupButtonID="imgCalendar">
            </cc2:CalendarExtender> 
                    
            
  </td>
  </tr>
  <tr>
  <td  align="center" class="GridItem"  style="text-align:center">
             <asp:GridView ID="grdTemporary" runat="server" AllowPaging="True" Width="750px" 
                     AutoGenerateColumns="False"  Visible ="False" DataSourceID="dsMessage" 
                     
                     CellPadding="4" ForeColor="#333333" GridLines="None">
                 <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                 <RowStyle BackColor="#EFF3FB" />
                 <Columns>
                     <asp:BoundField DataField="Label" />
                 </Columns>
             
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                   <RowStyle BackColor="#EFF3FB" />
                   <SelectedRowStyle BackColor="#FF5050" />
                   <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" 
                        Width="30px" />
                        
                    <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <EditRowStyle BackColor="LightGray" />
                    <RowStyle CssClass="AlternativeRowStyle" />
                    <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />
                    
                 
             </asp:GridView >
             
                 <asp:ObjectDataSource ID="dsMessage" runat="server" SelectMethod="GetMessage" 
                     TypeName="DirectService"></asp:ObjectDataSource>
             <br />
             </td>    
  </tr>
  <tr><td valign="top">
  <div style="height:auto; width:auto; overflow:auto"> 
                    
            
<asp:GridView ID="grdToDisplay" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" 
        OnPageIndexChanging="grdEquipment_PageIndexChanging" 
        
        AllowSorting="True" onrowcancelingedit="grdEquipment_RowCancelingEdit" 
        
        onrowdatabound="grdEquipment_RowDataBound1" 
       
        DataSourceID="odsEquipAlert"
        RowHeaderColumn="EquipmentId" CssClass="GridItem" BorderStyle="None" 
                    onselectedindexchanged="grdEquipment_SelectedIndexChanged" 
                    DataKeyNames="EquipmentId" PageSize="12" onrowcommand="grdToDisplay_RowCommand" 
        >
        <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" />
        <Columns>
            
            
            <asp:BoundField DataField="EQUIPMENTID" HeaderText="EquipmentId" 
                Visible="False">
                <ItemStyle Width="50px" />
            </asp:BoundField>
            <asp:BoundField DataField="CODENUMBER" HeaderText="Code">
                <ItemStyle Width="50px" />
            </asp:BoundField>
            <asp:BoundField HeaderText="System" DataField="SYSTEM">
                <ItemStyle Width="100px" />
            </asp:BoundField>
            <asp:BoundField HeaderText="Type" DataField="TYPEEQUIPMENT" >
                <ItemStyle Width="130px" />
            </asp:BoundField>
            <asp:BoundField DataField="MODEL" 
                HeaderText="Model" >
                <ItemStyle Width="100px" />
            </asp:BoundField>
            <asp:BoundField DataField="PurchaseDate" HeaderText="Purchase Date" 
                DataFormatString="{0:MM/dd/yyyy}" >
                <ItemStyle HorizontalAlign="Center" Width="50px" />
            </asp:BoundField>
            <asp:BoundField DataField="WarrantyPeriod" HeaderText="W. Period" >
                <ItemStyle HorizontalAlign="Right" Width="30px" />
            </asp:BoundField>
            <asp:BoundField DataField="UnitPrice" 
                HeaderText="U.P" >
                <ItemStyle HorizontalAlign="Right" Width="40px" />
            </asp:BoundField>
            <asp:CheckBoxField DataField="IsSparePart" HeaderText="Spare-part">
                <ItemStyle Width="50px" />
            </asp:CheckBoxField>
            <asp:BoundField DataField="DescriptionPurchase" 
                HeaderText="Purchase Des" >
                <ItemStyle Width="170px" />
            </asp:BoundField>
            <asp:BoundField DataField="ContratDescription" Visible="False">
                <ItemStyle Width="100px" />
            </asp:BoundField>
        </Columns>
        <PagerStyle HorizontalAlign="Center" 
            VerticalAlign="Middle" />
        <EditRowStyle BackColor="LightGray" />
        <RowStyle CssClass="AlternativeRowStyle" />
        <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />
    </asp:GridView>
 </div>      
         
    <asp:ObjectDataSource ID="odsEquipAlert" runat="server" 
        SelectMethod="GetEquipmentWarrantyAlert" TypeName="DirectService" 
          OldValuesParameterFormatString="original_{0}" 
          onselected="odsEquipAlert_Selected" onselecting="odsEquipAlert_Selecting">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtPurchaseDate" Name="purchaseD" 
                PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </td></tr>
    </table>
</asp:Panel>
</asp:Content>

